package jp.co.ziro.wikidozan.controller.wiki;

import java.util.logging.Logger;

import jp.co.ziro.wikidozan.controller.ControllerResponse;
import jp.co.ziro.wikidozan.controller.Request;
import jp.co.ziro.wikidozan.util.WikiArticle;



public class SaveController extends ShowController {

    @SuppressWarnings("unused")
    private static final Logger logger = Logger.getLogger(ShowController.class.getName());
    private static final String ARTICLE_CONTENT = "article-content";
    @Override
    protected ControllerResponse createResponse(Request requestData)
            throws Exception {

        String articleContent = requestScope(ARTICLE_CONTENT);

        logger.info(articleContent);
        WikiArticle article = new WikiArticle(requestData.getPath().getId(),articleContent.trim());
        return super.createResponse(requestData);
    }
}
